package com.hongli.blog.service.impl;

import com.hongli.blog.entity.RoleDao;
import com.hongli.blog.service.Roleservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author ZERO
 * @Date 2021/11/9 9:27
 **/
@Service
public class Roleserviceimpl implements Roleservice {

    @Autowired
    private Roleservice roleservice;

    @Override
    public List<RoleDao> SelectAllRole(){
        return roleservice.SelectAllRole();
    }

    @Override
    public RoleDao SelectRoleAdmin(){
        return roleservice.SelectRoleAdmin();
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void InsertRole(RoleDao roleDao){
        roleservice.InsertRole(roleDao);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void UpdataRoleNO(int roleid, String roleenableNo){
        roleservice.UpdataRoleNO(roleid,roleenableNo);
    }
}
